/**
 * 
 */
package fr.utbm.gi.vi51.slizers.framework.learning;

/**
 * Implementation of a Q-Learning container for the new state and the reward
 * associated with some action.
 * 
 * @author Tarik Belabbas
 * 
 */
public class QActionResult< StateType extends QState, ActionType extends QAction >
{
	/**
	 * The new state associated with the action.
	 */
	private final StateType	state;

	/**
	 * The reward of the action, must be in the range [ -1; 1 ].
	 */
	private final float		reward;

	/**
	 * Parameterized constructor.
	 * 
	 * @param _state the new state associated with the action
	 * @param _reward the reward of the action
	 */
	public QActionResult( StateType _state, float _reward )
	{
		this.state = _state;
		this.reward = _reward;
	}

	/**
	 * Returns the new state associated with the action.
	 * 
	 * @return the new state
	 */
	public StateType getState()
	{
		return this.state;
	}

	/**
	 * Returns the reward of the action.
	 * 
	 * @return the reward of the action
	 */
	public float getReward()
	{
		return this.reward;
	}
}
